package com.qingge.springboot.controller;

import com.qingge.springboot.common.Result;
import com.qingge.springboot.entity.CourseNew;
import com.qingge.springboot.service.ICourseNewService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/courseNew")
public class CourseNewController {

    @Resource
    private ICourseNewService newService;

    @GetMapping
    private Result getCourseNews(){
        List<CourseNew> list = newService.list();
        return Result.success(list);
    }

}
